package com.education.wisdom.service.impl;

import com.education.wisdom.mapper.CurriculumMapper;
import com.education.wisdom.pojo.Curriculum;
import com.education.wisdom.service.CurriculumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CurriculumServiceImpl implements CurriculumService {

    @Autowired
    private CurriculumMapper curriculumMapper;

    /**
     * 查询课程体系详情
     * @param cNumber 课程体系ID
     * @return
     */
    @Override
    public Curriculum selectCurriculumById(String cNumber) {
        return curriculumMapper.selectCurriculumById(cNumber);
    }

    /**
     * 公开课程展示
     * @return
     */
    @Override
    public List<Curriculum> selectCurriculumListPublic() {
        return curriculumMapper.selectCurriculumListPublic();
    }

    /**
     * 系列课程展示
     * @return
     */
    @Override
    public List<Curriculum> selectCurriculumLists() {
        return curriculumMapper.selectCurriculumLists();
    }

    /**
     * 最新课程展示
     * @return
     */
    @Override
    public List<Curriculum> selectCurriculumListNew() {
        return curriculumMapper.selectCurriculumListNew();
    }

    /**
     * 免费课程展示
     * @return
     */
    @Override
    public List<Curriculum> selectCurriculumListFree() {
        return curriculumMapper.selectCurriculumListFree();
    }

    /**
     * 最新课程展示
     * @param map
     * @return
     */
    @Override
    public List<Curriculum> selectCurriculumOrderTime(Map<String,Object> map) {
        return curriculumMapper.selectCurriculumOrderTime(map);
    }


    /**
     * 最热课程展示
     * @param map
     * @return
     */
    @Override
    public List<Curriculum> selectCurriculumOrderLearn(Map<String,Object> map) {
        return curriculumMapper.selectCurriculumOrderLearn(map);
    }


    /**
     * 更多课程展示
     * @param cProfessionalid	专业编号
     * @param cNumber	课程编号
     * @return
     */
    @Override
    public List<Curriculum> selectCurriculumListMore(String cProfessionalid, String cNumber) {
        return curriculumMapper.selectCurriculumListMore(cProfessionalid,cNumber);
    }

    /**
     *热门课程展示
     * @param cNumber
     * @return
     */
    @Override
    public List<Curriculum>  selectCurriculumListHot(String cNumber) {
        return curriculumMapper.selectCurriculumListHot(cNumber);
    }

    /**
     * 展示专业下课程信息
     * @param cProfessionalid 专业Id
     * @return
     */
    @Override
    public List<Curriculum> selectCurriculumByProId(String cProfessionalid) {
        return curriculumMapper.selectCurriculumByProId(cProfessionalid);
    }

    /**
     * 查询课程详情
     * @param map
     * @return
     */
    @Override
    public Curriculum selectCurriculumByNumber(Map<String,Object> map) {
        return curriculumMapper.selectCurriculumByNumber(map);
    }


    @Override
    public int insertCurriculum(Curriculum curriculum) {
        return 0;
    }

    @Override
    public int updateCurriculum(Curriculum curriculum) {
        return 0;
    }

    @Override
    public int deleteCurriculumByIds(String ids) {
        return 0;
    }
}
